#ifndef		__BSP_RTC_H_
#define		__BSP_RTC_H_

typedef	struct	t_rtc       {
    
		uint32_t	    day;
		uint32_t	    hour;
		uint32_t	    minute;
		uint32_t	    second; 
		uint32_t	    week;
    
        uint32_t        week_alarm;
        uint32_t        interrupt;
}rtc_t ;


typedef		void	(*rtcHandler_callback_t)(uint8_t val);

extern	void	Init_rtc(rtc_t *rtc);
extern	void	rtc_Register_Callback(rtcHandler_callback_t callback);
extern  void    rtc_Current_VAL(rtc_t *rtc);
extern  void    rtc_Alarm_Init(uint32_t no, rtc_t * rtc);


extern	void	Init_rtc_gpio(uint32_t	num);


#define     RTC_INT_DAY         (1<<0)
#define     RTC_INT_HOUR        (1<<1)
#define     RTC_INT_MIN         (1<<2)
#define     RTC_INT_SEC         (1<<3)   
#define     RTC_INT_T1          (1<<5)
#define     RTC_INT_T2          (1<<4)
#define     RTC_INT_T3          (1<<6)


#define     RTC_ALARM_SUN       (1<<17)  
#define     RTC_ALARM_MON       (1<<18)
#define     RTC_ALARM_TUES      (1<<19)
#define     RTC_ALARM_WED       (1<<20)
#define     RTC_ALARM_THUR      (1<<21)
#define     RTC_ALARM_FRI       (1<<22)
#define     RTC_ALARM_SAT       (1<<23)
  

#endif
